package com.edu.bhu.admin.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.bhu.admin.mapper.BikRepairMapper;
import com.edu.bhu.admin.domain.BikRepair;
import com.edu.bhu.admin.service.IBikRepairService;
import com.edu.bhu.common.core.text.Convert;

/**
 * 报修记录Service业务层处理
 * 
 * @author heyinan
 * @date 2022-03-15
 */
@Service
public class BikRepairServiceImpl implements IBikRepairService 
{
    @Autowired
    private BikRepairMapper bikRepairMapper;

    /**
     * 查询报修记录
     * 
     * @param repId 报修记录主键
     * @return 报修记录
     */
    @Override
    public BikRepair selectBikRepairByRepId(Long repId)
    {
        return bikRepairMapper.selectBikRepairByRepId(repId);
    }

    /**
     * 查询报修记录列表
     * 
     * @param bikRepair 报修记录
     * @return 报修记录
     */
    @Override
    public List<BikRepair> selectBikRepairList(BikRepair bikRepair)
    {
        return bikRepairMapper.selectBikRepairList(bikRepair);
    }

    /**
     * 新增报修记录
     * 
     * @param bikRepair 报修记录
     * @return 结果
     */
    @Override
    public int insertBikRepair(BikRepair bikRepair)
    {
        return bikRepairMapper.insertBikRepair(bikRepair);
    }

    /**
     * 修改报修记录
     * 
     * @param bikRepair 报修记录
     * @return 结果
     */
    @Override
    public int updateBikRepair(BikRepair bikRepair)
    {
        return bikRepairMapper.updateBikRepair(bikRepair);
    }

    /**
     * 批量删除报修记录
     * 
     * @param repIds 需要删除的报修记录主键
     * @return 结果
     */
    @Override
    public int deleteBikRepairByRepIds(String repIds)
    {
        return bikRepairMapper.deleteBikRepairByRepIds(Convert.toStrArray(repIds));
    }

    /**
     * 删除报修记录信息
     * 
     * @param repId 报修记录主键
     * @return 结果
     */
    @Override
    public int deleteBikRepairByRepId(Long repId)
    {
        return bikRepairMapper.deleteBikRepairByRepId(repId);
    }
}
